Optimal. Leaf size=98 \[ \frac {\sqrt {\frac {\pi }{2}} \cos \left (a-\frac {b^2}{4 c}\right ) \text {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {2 \pi }}\right )}{\sqrt {c}}-\frac {\sqrt {\frac {\pi }{2}} S\left (\frac {b+2 c x}{\sqrt {c} \sqrt {2 \pi }}\right ) \sin \left (a-\frac {b^2}{4 c}\right )}{\sqrt {c}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3529, 3433,
3432} \begin {gather*} \frac {\sqrt {\frac {\pi }{2}} \cos \left (a-\frac {b^2}{4 c}\right ) \text {FresnelC}\left (\frac {b+2 c x}{\sqrt {2 \pi } \sqrt {c}}\right )}{\sqrt {c}}-\frac {\sqrt {\frac {\pi }{2}} \sin \left (a-\frac {b^2}{4 c}\right ) S\left (\frac {b+2 c x}{\sqrt {c} \sqrt {2 \pi }}\right )}{\sqrt {c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3432
Rule 3433
Rule 3529
Rubi steps
\begin {align*} \int \cos \left (a+b x+c x^2\right ) \, dx &=\cos \left (a-\frac {b^2}{4 c}\right ) \int \cos \left (\frac {(b+2 c x)^2}{4 c}\right ) \, dx-\sin \left (a-\frac {b^2}{4 c}\right ) \int \sin \left (\frac {(b+2 c x)^2}{4 c}\right ) \, dx\\ &=\frac {\sqrt {\frac {\pi }{2}} \cos \left (a-\frac {b^2}{4 c}\right ) C\left (\frac {b+2 c x}{\sqrt {c} \sqrt {2 \pi }}\right )}{\sqrt {c}}-\frac {\sqrt {\frac {\pi }{2}} S\left (\frac {b+2 c x}{\sqrt {c} \sqrt {2 \pi }}\right ) \sin \left (a-\frac {b^2}{4 c}\right )}{\sqrt {c}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 85, normalized size = 0.87 \begin {gather*} \frac {\sqrt {\frac {\pi }{2}} \left (\cos \left (a-\frac {b^2}{4 c}\right ) \text {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {2 \pi }}\right )-S\left (\frac {b+2 c x}{\sqrt {c} \sqrt {2 \pi }}\right ) \sin \left (a-\frac {b^2}{4 c}\right )\right )}{\sqrt {c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 81, normalized size = 0.83
method | result | size |
default | \(\frac {\sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (\frac {\frac {b^{2}}{4}-a c}{c}\right ) \FresnelC \left (\frac {\sqrt {2}\, \left (c x +\frac {b}{2}\right )}{\sqrt {\pi }\, \sqrt {c}}\right )+\sin \left (\frac {\frac {b^{2}}{4}-a c}{c}\right ) \mathrm {S}\left (\frac {\sqrt {2}\, \left (c x +\frac {b}{2}\right )}{\sqrt {\pi }\, \sqrt {c}}\right )\right )}{2 \sqrt {c}}\) | \(81\) |
risch | \(\frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {i \left (4 a c -b^{2}\right )}{4 c}} \erf \left (\sqrt {i c}\, x +\frac {i b}{2 \sqrt {i c}}\right )}{4 \sqrt {i c}}-\frac {\sqrt {\pi }\, {\mathrm e}^{\frac {i \left (4 a c -b^{2}\right )}{4 c}} \erf \left (-\sqrt {-i c}\, x +\frac {i b}{2 \sqrt {-i c}}\right )}{4 \sqrt {-i c}}\) | \(99\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.29, size = 112, normalized size = 1.14 \begin {gather*} -\frac {\sqrt {2} \sqrt {\pi } {\left ({\left (\left (i - 1\right ) \, \cos \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) + \left (i + 1\right ) \, \sin \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right )\right )} \operatorname {erf}\left (\frac {2 i \, c x + i \, b}{2 \, \sqrt {i \, c}}\right ) + {\left (\left (i + 1\right ) \, \cos \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) + \left (i - 1\right ) \, \sin \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right )\right )} \operatorname {erf}\left (\frac {2 i \, c x + i \, b}{2 \, \sqrt {-i \, c}}\right )\right )}}{8 \, \sqrt {c}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.49, size = 103, normalized size = 1.05 \begin {gather*} \frac {\sqrt {2} \pi \sqrt {\frac {c}{\pi }} \cos \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) \operatorname {C}\left (\frac {\sqrt {2} {\left (2 \, c x + b\right )} \sqrt {\frac {c}{\pi }}}{2 \, c}\right ) - \sqrt {2} \pi \sqrt {\frac {c}{\pi }} \operatorname {S}\left (\frac {\sqrt {2} {\left (2 \, c x + b\right )} \sqrt {\frac {c}{\pi }}}{2 \, c}\right ) \sin \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right )}{2 \, c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.27, size = 88, normalized size = 0.90 \begin {gather*} \frac {\sqrt {2} \sqrt {\pi } \left (- \sin {\left (a - \frac {b^{2}}{4 c} \right )} S\left (\frac {\sqrt {2} \left (b + 2 c x\right )}{2 \sqrt {\pi } \sqrt {c}}\right ) + \cos {\left (a - \frac {b^{2}}{4 c} \right )} C\left (\frac {\sqrt {2} \left (b + 2 c x\right )}{2 \sqrt {\pi } \sqrt {c}}\right )\right ) \sqrt {\frac {1}{c}}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.47, size = 135, normalized size = 1.38 \begin {gather*} -\frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{4} \, \sqrt {2} {\left (2 \, x + \frac {b}{c}\right )} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )} \sqrt {{\left | c \right |}}\right ) e^{\left (-\frac {i \, b^{2} - 4 i \, a c}{4 \, c}\right )}}{4 \, {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )} \sqrt {{\left | c \right |}}} - \frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{4} \, \sqrt {2} {\left (2 \, x + \frac {b}{c}\right )} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )} \sqrt {{\left | c \right |}}\right ) e^{\left (-\frac {-i \, b^{2} + 4 i \, a c}{4 \, c}\right )}}{4 \, {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )} \sqrt {{\left | c \right |}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 99, normalized size = 1.01 \begin {gather*} \frac {\sqrt {2}\,\sqrt {\pi }\,\cos \left (\frac {4\,a\,c-b^2}{4\,c}\right )\,\mathrm {C}\left (\frac {\sqrt {2}\,\left (\frac {b}{2}+c\,x\right )\,\sqrt {\frac {1}{c}}}{\sqrt {\pi }}\right )\,\sqrt {\frac {1}{c}}}{2}-\frac {\sqrt {2}\,\sqrt {\pi }\,\sin \left (\frac {4\,a\,c-b^2}{4\,c}\right )\,\mathrm {S}\left (\frac {\sqrt {2}\,\left (\frac {b}{2}+c\,x\right )\,\sqrt {\frac {1}{c}}}{\sqrt {\pi }}\right )\,\sqrt {\frac {1}{c}}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________